package com.westos.mode.staticproxy;

import java.lang.reflect.Proxy;

public class ProxyTest {
	
	public static void main(String[] args) {
		
		Subject realSub=new RealSubject();
		Subject proxy=(Subject)Proxy.newProxyInstance(
			Subject.class.getClassLoader(),	
			new Class[]{Subject.class},
			new ProxyHandler(realSub)
		);
		proxy.request();
		int[] a=new int[]{1,2};
	}
}
